
@extends('/layouts.app')
@section("content")
    <div class="container">
        <div class="row">
            <div class="col-sm-2">
               @include("layouts.aside")
            </div>
            <div class="col-sm-10">

                <form class="form-horizontal" method="post" action="{{route("save")}}">

                    {{csrf_field()}}

                    <div class="form-group">

                        <input type="text" class="form-control"  placeholder="输入文章标题" name="title">
                    </div>
                    <div class="form-group">
                        <editor body="" type="write"></editor>
                    </div>
                    <div class="form-group">
                        <label for="type" class="col-sm-1 control-label">栏目</label>
                        <div class="col-sm-11">
                            <select class="form-control" id="type" name="type_id">
                                @foreach($types as $type)
                                <option value="{{$type->id}}">{{$type->name}}</option>
                                @endforeach
                            </select>
                        </div>

                    </div>
                    <div class="form-group">
                        <label for="type" class="col-sm-1 control-label">私密</label>
                        <div class="col-sm-11">
                            <select class="form-control" id="type" name="state">
                                <option value="1">公开</option>
                                <option value="0">私密</option>
                            </select>
                        </div>

                    </div>

                    <div class="form-group">
                        <div class="col-sm-11 col-sm-offset-1">
                            @include("layouts.error")
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-11 col-sm-offset-1">
                            <input type="submit" class="btn btn-default" value="发布博客">
                        </div>
                    </div>

                </form>


            </div>

        </div>

    </div>
@endsection




